package com.lagou.dao;

import com.lagou.util.Configuration;

import java.beans.PropertyVetoException;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;

public class UserDao {
    public void updateUser(){
        try {
            Connection connection = Configuration.getDataSource().getConnection();
            String sql="update web_user set c_name ='张三' where id =1";
            PreparedStatement preparedStatement = connection.prepareStatement(sql);
            preparedStatement.execute();
        }catch (Exception e){
            e.printStackTrace();
        }

    }
}
